home *** CD-ROM | disk | FTP | other *** search
/ Resource Library: Multimedia / Resource Library: Multimedia.iso / utils / graphic / convrtrs / mac / sprkl103.hqx / README 1st next >
Encoding:
Text File  |  1993-05-12  |  10.1 KB  |  190 lines

  1. Sparkle: A new mac MPEG player.
  2. -------------------------------
  3.  
  4. Hi there, friendly users. This is release 1.02 of my mac MPEG player.
  5. One day a few weeks ago it struck me as ridiculous that no mac MPEG 
  6. player existed---how hard could it be to write one? So I grabbed the 
  7. Berkeley UNIX source for an X-windows based MPEG player and managed to 
  8. get it compiled and running on my mac in a few hours. But the result was 
  9. very unsatisfactory, a completely un-mac-like application. So I spent 
  10. some time integrating what I had into the framework of the Think Class 
  11. Library and this is the result.
  12. (Anyone who wants to play with the Berkeley code can get it from 
  13. toe.cs.berkeley.edu in pub/multimedia/mpeg.)
  14.  
  15. Please read all of this document before playing with the program. While 
  16. actually using the program is pretty simple, there are a few things you 
  17. should be aware of.
  18.  
  19. Features:
  20. Ñ    Standard mac interface with menus and windows.
  21. Ñ    Uses the QuickTime movie controller to control the MPEG viewing.
  22. Ñ    MultiFinder friendly, with good backgrounding behavior.
  23. Ñ    Saves MPEGs to QuickTime movies.
  24. Ñ    Can open multiple files at once.
  25. Ñ    Free.
  26.  
  27. To run it needs at least:
  28. Ñ    System 7.
  29. Ñ    QuickTime 1.5
  30. Ñ    A 68020 or better.
  31. Ñ    2MB to play one 160x120 MPEG---to open more or large MPEGs increase the
  32.     partition.
  33.  
  34. This program works fine, with good handling of errors, on my SE/30, but 
  35. that's the only machine I have to test it. If you find a bug that is not 
  36. caused by the various things listed below, please mail me with as many 
  37. details as possible, both about your machine and about what the  program 
  38. was last doing before it died on you.
  39.  
  40. I don't think there's much to say on the use of this program---you pretty 
  41. much run it like any other mac program. The one important thing to note 
  42. is that I don't yet know what whoever it is who decides these things has 
  43. said the file type of MPEG files should be. Thus Sparkle will open files 
  44. of type 'MPEG', type 'BINA' and type '????'. It WILL NOT open files of 
  45. type 'TEXT'. I know this is the file type used by the other mac (but not 
  46. very mac-like) MPEG program out there, and I considered adding it, but if 
  47. one is using something like Boomerang it makes the menus a pain. If 
  48. anyone desperately needs this feature, mail me with a justification and I 
  49. might add it. To get a custom icon, give the MPEG file a type of 'MPEG' 
  50. and a creator of 'mMPG'.
  51.  
  52. There are a number of limitations to this release of the program and I 
  53. want to explain them so that people don't get angry at me for a lousy 
  54. piece of code, or tell me how any bozo could do better. The program 
  55. should work fine if you don't stress it too hard. If you don't like 
  56. these limitations, you are welcome to trash it and wait for version 2.0 
  57. which will (I hope) remove them. I figured people would prefer a usable, 
  58. non-perfect program to nothing.
  59.  
  60. The limitations stem from two sources. One is that I do NOT have a copy 
  61. of the MPEG Draft International Standard, the document that details the 
  62. exact nature of the MPEG file format---how many bits in each field, what 
  63. different fields do etc. All I have is the Berkeley MPEG code, and an 
  64. overall understanding of how MPEG encoding works. I have a copy of the DIS 
  65. on order, but until I have it in my hands, I am limited in what I can do.
  66. The Berkeley MPEG code has problems. It sometimes skips frames. It 
  67. produces random fuzz around the edge of pictures. Sometimes it creates a 
  68. block of the wrong color. Also the Berkeley code was written for a UNIX 
  69. box, thus it assumes infinite memory reserves and guzzles them happily. 
  70. It assumes 32 bit ints. It may assume multiplications are cheap.
  71.  
  72. I have started working on making the Berkeley code more mac 
  73. friendly---attempting to use 16 bits ints where possible, attempting to 
  74. speed up the code, making the Berkeley subroutines object methods---but 
  75. I have hit the limit of what I can do without the DIS. This program 
  76. suffers from various anomalies because of that UNIX heritage:
  77. Ñ    Errors in the UNIX code are not well handled---they may pop up an 
  78.     informational message or they may crash the machine.
  79. Ñ    Memory handling in the UNIX code is poor. Lots of memory is allocated 
  80.     in a very un-mac-friendly way. If the system runs out of memory while in 
  81.     the UNIX code it may (rarely) crash or (more likely) stop what it's 
  82.     doing without an error message.
  83. Ñ    Frames may occasionally be skipped, particularly at the beginning of 
  84.     the movie.
  85. Ñ    The total number of frames given for the movie when it plays is an 
  86.     estimate. Because of skipped frames and other features, the movie may 
  87.     stop playing a few frames before that number is reached---for example 
  88.     the movie may stop playing at what it says is frame 295/300. 
  89. Ñ    Random access on movies is not supported---you can go forward, and 
  90.     rewind to the start---that's it.
  91. Ñ    Displaying frames is slow---I get about a frame per two seconds on my 
  92.     SE/30 on a 120x160 MPEG. It's not really practical to attempt to view 
  93.     the movie this way---convert it to QuickTime and watch that.
  94. Ñ    Towards the beginning of the movie (in the first two or three frames) 
  95.     if you force an update event on a window, it will display garbage.
  96. I hope to fix all these problems, but I'm not going to waste time trying 
  97. to code around them until I get the DIS.
  98.  
  99. The portion of the code written by me, the user interface elements, 
  100. should behave much better. If any problems occur within that code you 
  101. should get an error message and things should continue smoothly.
  102.  
  103. I appreciate that most of you won't care whether a problem is in my code 
  104. or the UNIX code---you want bug-free software. I'm explaining this so you 
  105. see why I can't yet give that to you.
  106.  
  107. I have a number of ideas to add to this code, but wanted to release 
  108. something before summer. My summer plans are unsettled, but I may have
  109. a job far from any mac, so it may be some time before version 2.0 comes 
  110. out. I have many plans and ideas for this program---they'll be added 
  111. pretty much randomly as the mood strikes me. You're welcome to suggest 
  112. ideas, but I've probably already thought of them.
  113. Among others:
  114. Ñ    Balloon help.
  115. Ñ    Scriptability.
  116. Ñ    Displaying the QT movie as it's made so you can see if you like the 
  117.     quality and frame-rate.
  118. Ñ    Connecting to PhotoShop (or at least PhotoShop plugins) to fiddle each 
  119.     frame before saving it---some MPEGs are way too blurry.
  120. Ñ    Adding an "About box..." (It was either that or GWorld support as the 
  121.     last thing I did before release and I figured GWorld support was more 
  122.     important.)
  123. Ñ    Improve the message displaying.
  124. Ñ    Add animated cursors during the lengthy startup periods.
  125. Ñ    User preferences for various things.
  126.  
  127. If people can help with the following, I would be grateful:
  128. Ñ    My present icons aren't great (IMHO) (though are better than some I've 
  129.     seen. If anyone comes up with something better and wants to donate them 
  130.     to me, I'll gladly accept.)
  131. Ñ    Are any of my command-keys or menu outlays or such in violation of 
  132.     Apple Human Interface Guidelines? Any strong opinions on the matter 
  133.     welcomed.
  134. Ñ    What sort of user interface should I present when playing back the 
  135.     QuickTime movie as it's being created from the MPEG? A separate window?
  136.     A movie below the MPEG? Alongside the MPEG?
  137.     And is possible to play a movie as it is being created? Anyone have any 
  138.     sample code that does this?
  139. Ñ    How (in the context of the Think Class Library) do I get the number of 
  140.     document windows on the screen (ignoring the floating window and dialogs 
  141.     and such.) Right now I use 
  142.         gDesktop->itsWindows->GetNumItems()
  143.     which sorta works but gives strange results I've had to compensate for 
  144.     as best I can (like when a single open document is being closed, it 
  145.     reports that two windows are open.) That call also falls apart when a 
  146.     CATCH handler is invoked as a result of low memory.
  147. Ñ    What's the deal with G-worlds and dithering? Each MPEG frame is created 
  148.     by the reverse DCTs and other MPEG magic into a 24bit buffer which I set 
  149.     to the base address of a pixMap. If I directly copy-bits from that to 
  150.     the screen with a ditherCopy mode, at 8 bits or less I will get obvious 
  151.     tearing which looks ugly. So I created a GWorld with pixel depth 0, I 
  152.     copy-bits to the Gworld, then copy-bits from that to the screen. Each 
  153.     time through the loop, I use UpdateGWorld in case the screen depth has 
  154.     changed or the window has moved to a different monitor. So far so good.
  155.     But, my first attempt to create a GWorld used the noNewDevice flag, 
  156.     which I figured was fine since I was using pixel-depth 0. However, if I 
  157.     dragged the window from my color screen to the SE/30's internal B/W 
  158.     screen then back to the color screen, strange things happened. My window 
  159.     contents were drawn fine, but the window title-bar and frame were mucked 
  160.     up. So I now create the GWorld without the noNewDevice flag, and the 
  161.     window is mostly fine, but if I drag it fully onto the B/W screen it 
  162.     give very strange dithering. If it partly straddles a color and B/W 
  163.     screen the dithering is fine.
  164.     Why did my first GWorld call go wrong, and why is my dithering now wrong?
  165.     I left things the way they are since it seemed more folks cared about 
  166.     tearing than about movie the window from one screen to another, but this 
  167.     bugs me.
  168.  
  169. Various people over the net helped me in the course of this project, 
  170. mailing me sample code or header files, answering questions etc. I won't 
  171. embarrass them by naming them, but will thank them here.
  172. Also thanks to the author of the Infinity Windoid WDEF which I use in my 
  173. code.
  174.  
  175. I hope you like the name Sparkle. I can't believe no commercial software 
  176. uses it yet. It's based on a favorite phrase of a close friend of mine.
  177.  
  178. A thumbs down to the MPEG committee who won't put the MPEG specs up for 
  179. FTP anywhere, and make my life more difficult.
  180. Another thumbs down for Apple who took forever to release the Inside 
  181. Mac: QuickTime volume and who STILL have not released the QuickTime 
  182. Components volume, and who don't yet have QuickTime 1.5 headers and glue 
  183. at their ftp site, let along QuickTime 1.6.
  184. A thumbs up for Thinks C (not for Symantec as a whole---some of their 
  185. products suck). I do wish it were full C++, but their C+-, TCL and 
  186. debugger make for a really pleasnt environment.
  187.  
  188. Maynard Handley 
  189. maynard@helios.tn.cornell.edu
  190. May 09 1993